<include file="Index:header" />
<!--头部 end -->
<!--左栏 starts -->
<div class="container-fluid">
		<div class="row-fluid">
			<include file="left" />

			<div id="content" class="span10">
			<!-- content starts -->
<!--左栏 end -->
<ul class="breadcrumb">
      <li>
        <a href="__APP__/ADMINADSS">首页</a> <span class="divider">/</span>
      </li>
      <li>
        <a href="__APP__/ADMINADSS/Fund/envelope.html">红包设置</a> <span class="divider">/</span>
      </li>
      <li class="active">添加/修改</li>
    <div  class="pull-right"> <a class="ajax-link" href="__APP__/ADMINADSS/Fund/envelope.html" >返回红包设置</a></div>
</ul>
<form method="post"  action='__APP__/ADMINADSS/Fund/envelopeSave'>
 <table class="table table-striped table-bordered table-condensed">
   <tbody>
      <tbody>
                      <tr>
                        <td>名称：</td>
                        <td>
                          <input name="name" type="text" class="span5" placeholder="请输入名称..." value="{$redpacket.name}" maxlength="20">
                        </td>
                      </tr>
                      <tr>
                        <td>金额：</td>
                        <td>
                          <input name="money" type="text" class="span2" placeholder="请输入金额..." value="{$redpacket.money}"  maxlength="15">元
                        </td>
                      </tr>
                      <tr>
                        <td>使用说明：</td>
                        <td>
                         <textarea name="conditions" placeholder="使用说明..."  maxlength="200">{$redpacket.conditions}</textarea>
                        </td>
                      </tr>
                      <tr>
                          <td>活动开始时间：</td>
                          <td>
                              <input name="starttime" type="text" id="starttime" style="width:150px;" value='<gt name="redpacket.starttime" value="0">{$redpacket.starttime|date="Y-m-d",###}</gt>'/>
                          </td>
                      </tr>
                      <tr>
                          <td>活动结束时间：</td>
                          <td>
                              <input name="endtime" type="text" id="endtime" style="width:150px;" value='<gt name="redpacket.endtime" value="0">{$redpacket.endtime|date="Y-m-d",###}</gt>'/>
                          </td>
                      </tr>

                      <tr>
                          <td>最小金额（包含）：</td>
                          <td>
                              <input name="minmoney" class="span2" type="text" id="minmoney" style="width:150px;" value="{$redpacket.minmoney}"/>元
                          </td>
                      </tr>
                      <tr>
                          <td>最大金额（不包含）：</td>
                          <td>
                              <input name="maxmoney" class="span2" type="text" id="maxmoney" style="width:150px;" value="{$redpacket.maxmoney}"/>元
                          </td>
                      </tr>
                      <tr>
                          <td>
                              红包类型：
                          </td>
                      <td class="form-inline">
                          <label class="checkbox inline counter_check">
                              <input name="isinvest" type="radio" checked value="1" >投资红包
                          </label>
                          <label class="checkbox inline counter_check">
                              <input name="isinvest" type="radio" value="0">普通红包
                          </label>
                          <br/> <span class="red">奖励红包：投资成功时使用的红包。普通红包：投资成功时不用，根据实际情况调用</span>
                      </td>
                      </tr>

                      <tr>
                        <td>数量：</td>
                        <td>
                         <input name="number" type="text" class="span1" value='<eq name="redpacket.number" value="-1"><else/>{$redpacket.number}</eq>' placeholder="可为空"  maxlength="11">个<br />
                        <span class="red">不限制数量的话，请设为空;设置数量后，当超过所设置数量时，自动关闭</span>
                        </td>
                      </tr>
                      <if condition="$redpacket.starttime gt 0">
                      <tr>
                        <td>
                               状态：
                        </td>
                        <td class="form-inline">
                               <if condition="$redpacket['state'] eq 0">
                               未开始
                               <elseif condition="$redpacket['state'] eq 1"/>
                               进行中
                               <elseif condition="$redpacket['state'] eq 2"/>
                               已结束
                               <else />
                               已停止
                               </if>
                        </td>
                      </tr>
                      </if>
                      <tr>
                        <td>
                               修改状态：
                        </td>
                        <td class="form-inline">
                        	<label class="checkbox inline counter_check">
                                <input name="state" type="radio" value="{$redpacket['state']}" checked>
                                维持现状
                            </label>
                        	<label class="checkbox inline counter_check">
                                <input name="state" type="radio" value="1" >
                                开始
                            </label>
                            <label class="checkbox inline counter_check">
                                <input name="state" type="radio" value="3">
                                停止
                            </label>
                        </td>
                      </tr>
      </tbody>
 </table>
<div>
<div class="span4">

</div>
<div class="span5">
<input name="sid" type="hidden" value="{$Think.get.id}" />
          <button class="btn btn-primary" type="submit">
              提交
          </button>
</div>
</div>
</form>
<!--底部 -->
<include file="Index:footer" />
<!-- 日期选择器 -->
<link type="text/css" rel="stylesheet" href="__PUBLIC__/css/jquery.datetimepicker.css">
  <script src="__PUBLIC__/js/jquery.datetimepicker.js"></script>
<script>
$('#starttime').datetimepicker({lang:'ch',timepicker:false,format:'Y-m-d',});
$('#endtime').datetimepicker({lang:'ch',timepicker:false,format:'Y/m/d'});
</script>
